package com.igeekhome.util;

public class TableResultBean extends ResultBean {
	public static final int DATA_SUCCESS_CODE = 0;
	public static final int DATA_FAIL_CODE = 500;
	private Long count;
	private Integer rank;
	
	public Long getCount() {
		return count;
	}

	public void setCount(Long count) {
		this.count = count;
	}

	public TableResultBean(Integer code,String msg,Long count,Object data) {
		super(code, msg, data);
		this.count = count;
	}
	public TableResultBean(Integer code,String msg,Integer rank,Object data) {
		super(code, msg, data);
		this.rank = rank;
	}

	public static TableResultBean ok(Long count, Object data) {
		return new TableResultBean(DATA_SUCCESS_CODE, "成功", count, data);
	}
	public static TableResultBean fail(String msg) {
		return new TableResultBean(DATA_FAIL_CODE, msg, 0L, null);
	}
}
